/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2013
 */

package com.smg.community.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import javacommon.base.*;
import javacommon.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.smg.community.model.*;
import com.smg.community.dao.*;
import com.smg.community.service.*;
import com.smg.community.vo.query.*;

/**
 * @author badqiu email:badqiu(a)gmail.com
 * @version 1.0
 * @since 1.0
 */


public class SmgMemberVisit extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "SmgMemberVisit";
	public static final String ALIAS_VID = "vid";
	public static final String ALIAS_FROM_MEMBER_ID = "fromMemberId";
	public static final String ALIAS_FROM_MEMBER_NAME = "fromMemberName";
	public static final String ALIAS_FROM_MEMBER_HEAD_IMAGE = "fromMemberHeadImage";
	public static final String ALIAS_TO_MEMBER_ID = "toMemberId";
	public static final String ALIAS_TO_MEMBER_NAME = "toMemberName";
	public static final String ALIAS_TO_MEMBER_HEAD_IMAGE = "toMemberHeadImage";
	public static final String ALIAS_VISIT_DATE = "visitDate";
	
	//date formats
	public static final String FORMAT_VISIT_DATE = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * vid       db_column: vid 
     */	
	
	private java.lang.Integer vid;
    /**
     * fromMemberId       db_column: fromMemberId 
     */	
	
	private java.lang.Integer fromMemberId;
    /**
     * fromMemberName       db_column: fromMemberName 
     */	
	private java.lang.String fromMemberName;
    /**
     * fromMemberHeadImage       db_column: fromMemberHeadImage 
     */	
	private java.lang.String fromMemberHeadImage;
    /**
     * toMemberId       db_column: toMemberId  
     */	
	
	private java.lang.Integer toMemberId;
    /**
     * toMemberName       db_column: toMemberName 
     */	
	private java.lang.String toMemberName;
    /**
     * toMemberHeadImage       db_column: toMemberHeadImage 
     */	
	private java.lang.String toMemberHeadImage;
    /**
     * visitDate       db_column: visitDate 
     */	
	
	private java.util.Date visitDate;
	//columns END

	public SmgMemberVisit(){
	}

	public SmgMemberVisit(
		java.lang.Integer vid
	){
		this.vid = vid;
	}

	public void setVid(java.lang.Integer value) {
		this.vid = value;
	}
	
	public java.lang.Integer getVid() {
		return this.vid;
	}
	public void setFromMemberId(java.lang.Integer value) {
		this.fromMemberId = value;
	}
	
	public java.lang.Integer getFromMemberId() {
		return this.fromMemberId;
	}
	public void setFromMemberName(java.lang.String value) {
		this.fromMemberName = value;
	}
	
	public java.lang.String getFromMemberName() {
		return this.fromMemberName;
	}
	public void setFromMemberHeadImage(java.lang.String value) {
		this.fromMemberHeadImage = value;
	}
	
	public java.lang.String getFromMemberHeadImage() {
		return this.fromMemberHeadImage;
	}
	public void setToMemberId(java.lang.Integer value) {
		this.toMemberId = value;
	}
	
	public java.lang.Integer getToMemberId() {
		return this.toMemberId;
	}
	public void setToMemberName(java.lang.String value) {
		this.toMemberName = value;
	}
	
	public java.lang.String getToMemberName() {
		return this.toMemberName;
	}
	public void setToMemberHeadImage(java.lang.String value) {
		this.toMemberHeadImage = value;
	}
	
	public java.lang.String getToMemberHeadImage() {
		return this.toMemberHeadImage;
	}
	public String getVisitDateString() {
		return DateConvertUtils.format(getVisitDate(), FORMAT_VISIT_DATE);
	}
	public void setVisitDateString(String value) {
		setVisitDate(DateConvertUtils.parse(value, FORMAT_VISIT_DATE,java.util.Date.class));
	}
	
	public void setVisitDate(java.util.Date value) {
		this.visitDate = value;
	}
	
	public java.util.Date getVisitDate() {
		return this.visitDate;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Vid",getVid())
			.append("FromMemberId",getFromMemberId())
			.append("FromMemberName",getFromMemberName())
			.append("FromMemberHeadImage",getFromMemberHeadImage())
			.append("ToMemberId",getToMemberId())
			.append("ToMemberName",getToMemberName())
			.append("ToMemberHeadImage",getToMemberHeadImage())
			.append("VisitDate",getVisitDate())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getVid())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SmgMemberVisit == false) return false;
		if(this == obj) return true;
		SmgMemberVisit other = (SmgMemberVisit)obj;
		return new EqualsBuilder()
			.append(getVid(),other.getVid())
			.isEquals();
	}
}

